//
//  MineUserInfoCell.m
//  BaseAPP
//
//  Created by Evisu on 16/12/16.
//  Copyright © 2016年 evisum. All rights reserved.
//

#import "MineUserInfoCell.h"

@interface MineUserInfoCell ()

@property (nonatomic, strong)UIImageView *ivIcon;

@property (nonatomic, strong)UILabel *labNickName;

@property (nonatomic, strong)UILabel *labWechatNumber;

@property (nonatomic, strong)UIImageView *ivArrow;

@property (nonatomic, strong)UIImageView *ivQRCode;

@end

@implementation MineUserInfoCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {

    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        
        [self initViews];
        [self layoutViews];
    }
    
    return self;
}

- (void)initViews {

    self.ivIcon = [[UIImageView alloc] init];
    self.ivIcon.image = [UIImage imageNamed:@"headImage.jpg"];
    
    self.labNickName = [[UILabel alloc] init];
    self.labNickName.text = @"E.";
    self.labNickName.font = [UIFont systemFontOfSize:14.0];
    self.labNickName.textColor = HEXColor(@"060606");
    
    self.labWechatNumber = [[UILabel alloc] init];
    self.labWechatNumber.text = @"微信号：_493879263";
    self.labWechatNumber.font = [UIFont systemFontOfSize:14.0];
    self.labWechatNumber.textColor = HEXColor(@"1F1F1F");
    
    self.ivQRCode = [[UIImageView alloc] init];
    self.ivQRCode.image = [UIImage imageNamed:@"setting_myQR@2x"];
    
    self.ivArrow = [[UIImageView alloc] init];
    self.ivArrow.image = [UIImage imageNamed:@"arrow_ico"];
    
    
    [self.contentView addSubview:self.ivIcon];
    [self.contentView addSubview:self.labNickName];
    [self.contentView addSubview:self.labWechatNumber];
    [self.contentView addSubview:self.ivQRCode];
    [self.contentView addSubview:self.ivArrow];
}


- (void)layoutViews {

    self.ivIcon.sd_layout
    .centerYEqualToView(self.contentView)
    .leftSpaceToView(self.contentView, 14)
    .widthIs(68)
    .heightIs(68);
    
    self.labNickName.sd_layout
    .topSpaceToView(self.contentView, 24)
    .leftSpaceToView(self.ivIcon, 14)
    .rightSpaceToView(self.contentView, 50)
    .heightIs(14);
    
    self.labWechatNumber.sd_layout
    .bottomSpaceToView(self.contentView, 24)
    .leftSpaceToView(self.ivIcon, 14)
    .rightSpaceToView(self.contentView, 50)
    .heightIs(14);
    
    self.ivQRCode.sd_layout
    .centerYEqualToView(self.contentView)
    .rightSpaceToView(self.contentView, 32)
    .widthIs(18)
    .heightIs(18);
    
    self.ivArrow.sd_layout
    .centerYEqualToView(self.contentView)
    .rightSpaceToView(self.contentView, 16)
    .widthIs(8)
    .heightIs(15);
    
}

@end
